package demo2;

public class Test {

    public static void main(String[] args) {
        Triangle triangle = new Triangle();
        Square square = new Square();
        Circle circle = new Circle();

    Shape[]shapes ={triangle,square,circle,square,triangle};
    for (Shape shape:shapes){
        shape.draw();
    }

//        String[] strings = {"triangle","circle","square","circle","triangle"};
//        for (String string : strings ){
//            if(string.equals("triangle")){
//                triangle.draw();
//            } else if(string.equals("circle")){
//                circle.draw();
//            }
//            else if(string.equals("square")){
//                square.draw();
//            }
//            else if(string.equals("circle")){
//                circle.draw();
//            }
//            else if(string.equals("triangle")){
//                triangle.draw();
//            }
//        }
//    }

}
}
